package com.ming.closeto.base;

import android.app.Application;
import android.os.Build;
import android.support.annotation.RequiresApi;

import com.ming.closeto.utils.LogUtils;
import com.ming.closeto.utils.ProcessUtils;
import com.ming.closeto.utils.ScreenUitls;

public class BaseApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        LogUtils.i("process:" + ProcessUtils.getTopProcess());
        if (getApplicationInfo().packageName.equals(ProcessUtils.getTopProcess())) {
            init();
        }

    }

    @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR1)
    private void init() {
        ScreenUitls.init(this);
    }
}
